home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 1 / Gold Medal Software Volume 1 (Gold Medal) (1994).iso / prog / cextract.arj / CEXTRACT.TAR / cextract / proto.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-08-08  |  5.4 KB  |  177 lines

  1. /*
  2.  *   This file was automatically generated by version 1.7 of cextract.
  3.  *   Manual editing not recommended.
  4.  *
  5.  *   Created: Fri Oct 30 15:57:04 1992
  6.  */
  7. #ifndef _proto_h_
  8. #define _proto_h_
  9. #if __STDC__
  10. #define PL_(x) x
  11. #else
  12. #define PL_(x) ( )
  13. #endif /* __STDC__ */
  14.  
  15. /* main.c:
  16.  *
  17.  * The purpose of this program is to extract the function descriptions
  18.  * (prototypes) from C source code.  It also provides for the creation
  19.  * of documentation based on those prototypes.
  20.  *
  21.  * The specific reason for the creation of this program was to
  22.  * provide a method for automatically creating header files to
  23.  * describe all of the functions to be used within a multi-file
  24.  * program.
  25.  *
  26.  * This file makes use of code in the companion files parse.c and io.c.
  27.  *
  28.  * Copyright (c) 1990, 1991, 1992 by Adam Bryant
  29.  *
  30.  * See Copyright notice in the file parse.c or in the manual page.
  31.  *
  32.  */
  33.  
  34. /* quick function to copy a "string" */
  35. extern int copy_str PL_(( char *o_str, char *in_str ));
  36.  
  37. /* return FALSE if character is not a normal part of a filename */
  38. extern int fname_char PL_(( int ch ));
  39.  
  40. /* retrieve the value of a global option */
  41. extern int get_option PL_(( Optype which ));
  42.  
  43. /* control program flow and command line options */
  44. extern int main PL_(( int argc, char **argv ));
  45.  
  46. /* output filter from the parsing routines */
  47. extern void out_char PL_(( int type, int outch ));
  48.  
  49. /* transmit the currently stored comment to the output file */
  50. extern void send_first_comment PL_(( char *begin_str ));
  51.  
  52. /* set the value of a global option */
  53. extern void set_option PL_(( Optype which, int how, int value ));
  54.  
  55. /* show all of the settings */
  56. extern void show_settings PL_(( void ));
  57.  
  58. /* show the usage for the program */
  59. extern void show_usage PL_(( void ));
  60.  
  61. /* show the version of the program */
  62. extern void show_version PL_(( void ));
  63.  
  64. /* io.c:
  65.  *
  66.  * cextract input/output routines.
  67.  *
  68.  * Copyright (c) 1992 by Adam Bryant
  69.  *
  70.  * See the Copyright notice in the file parse.c or in the manual page.
  71.  *
  72.  */
  73.  
  74. /* close up the "pipe" */
  75. extern int close_input PL_(( FILE *stream ));
  76.  
  77. /* close up properly; sending out final output */
  78. extern void cxt_close PL_(( void ));
  79.  
  80. /* read in all configuration files */
  81. extern void do_config PL_(( void ));
  82.  
  83. /* send a system error message */
  84. extern void err_msg PL_(( char *estr ));
  85.  
  86. /* routine to check return value of fputs */
  87. extern void fput_string PL_(( char *outstr, FILE *filep ));
  88.  
  89. /* quickie function to distinquish proper switches */
  90. extern int is_switch PL_(( int ch ));
  91.  
  92. /* return pointer to string containing the date */
  93. extern char * mach_time PL_(( void ));
  94.  
  95. /* does the string match a minimum number of characters */
  96. extern int minmatch_str PL_(( char *str_in, char *str_base, int num ));
  97.  
  98. /* function to open a "pipe" to the input */
  99. extern FILE * open_input PL_(( char *pname, char *modestr ));
  100.  
  101. /* output given function prototype */
  102. extern void out_proto PL_(( int omode, P_PROTO f_ptr, int mode, int do_comments ));
  103.  
  104. /* call the external routine out_char() and send out all characters */
  105. extern void out_str PL_(( int omode, char *str ));
  106.  
  107. /* determine the configuration command, exit if invalid */
  108. extern void parse_cmd PL_(( char *cmd_str, int set_val, int cmd_line ));
  109.  
  110. /* function to parse the configuration file */
  111. extern void parse_config PL_(( char *conf_fname ));
  112.  
  113. /* output results of entire file search */
  114. extern void send_file PL_(( void ));
  115.  
  116. /* send a message that their was a syntax error */
  117. extern void syntax_err PL_(( char *estr ));
  118.  
  119. /* search for expanded value of the varargs setup */
  120. extern int vargs_find PL_(( void ));
  121.  
  122. /* parse.c:
  123.  *
  124.  * main parsing routines for the cextract/cextdoc programs.
  125.  * Also includes a number of generic routines applicable to both.
  126.  *
  127.  * These routines provide the methods used to extract comments,
  128.  * prototypes and function names from C source files.
  129.  *
  130.  * Copyright (c) 1990, 1991, 1992 by Adam Bryant
  131.  *
  132.  * The only restrictions on the use of these routines is that they not
  133.  * be used for monetary gain, and that this copyright notice be left
  134.  * intact.
  135.  *
  136.  * Note:  These programs may be freely used to extract code and/or
  137.  *        documentation at proprietary/corporate sites, as long as the
  138.  *        actual source code is not used within any proprietary code.
  139.  *
  140.  *        The generated output (header) files are distributable in any
  141.  *        manner desired as they are based on the scanned source code,
  142.  *        not my program.
  143.  */
  144.  
  145. /* add a new macro to the macro list */
  146. extern void add_macro PL_(( int select, char *str ));
  147.  
  148. /* add a new substitution macro to the substitution list */
  149. extern void add_subst PL_(( int type, int select, char *f_str, char *t_str ));
  150.  
  151. /* initialize the page for troff output, if needed */
  152. extern void init_roff PL_(( int omode ));
  153.  
  154. /* go through the file extracting functions */
  155. extern void parse_file PL_(( void ));
  156.  
  157. /* remove the top item on the stack */
  158. extern void pop_proto PL_(( void ));
  159.  
  160. /* check preprocessor statement for line numbering changes */
  161. extern int preprocessor_check PL_(( void ));
  162.  
  163. /* if the matching definition is in the list, remove it */
  164. extern int removed_macro PL_(( int select, char *str ));
  165.  
  166. /* sort the list of functions and their prototypes */
  167. extern void sort_proto PL_(( void ));
  168.  
  169. /* compare two strings considering cases the same */
  170. extern int str_test PL_(( char *s1, char *s2 ));
  171.  
  172. /* remove any preceding and trailing spaces */
  173. extern void trim_str PL_(( char *str ));
  174.  
  175. #undef PL_
  176. #endif /* _proto_h_ */
  177.